<?php if(!defined('IN_PISCES')){exit('Access Denied.');}?>
<script type="text/javascript">
var successFun=function(res){
if(res.code==200){
	alert('修改成功!');
	if (res.data.forward)document.location	= res.data.forward;
}else{
	alert('出错了，请重新尝试！');
}
}
$(document).ready(function() { 
	var updateOptions	= {dataType:'json',error:doError,success:doSuccess}
    $('#setform').ajaxForm(updateOptions); 
    $.Pub_Count_Bind($("#introduce").get(0));
}); 
</script>
<div class="piece1">
<div class="piece1_hd"></div>
<div class="piece1_bd clearfix">
<div style="width:960px;" id="content"><div id="setting_bar" class="fl ">
<h1>设置</h1>
<div class="base_info">
<a {if $this->data['type']=='personal'}class="c"{/if} href="{url('User','Set',array('type'=>'personal'))}">基本信息</a><br>
<a {if $this->data['type']=='password'}class="c"{/if}  href="{url('User','Set',array('type'=>'password'))}">修改密码</a><br>
</div>
</div><div class="fl" id="setting_box">
<div class="setting_basic" id="setting_form">
{if $this->data['type']=='personal'}
<form id="setform" method="post" action="{url('User','SavePersonal')}">
<dl>
<dd>邮箱：</dd>
<dt style="padding-top:5px;">{if $this->data['master']['email']}{$this->data['master']['email']}{else}<input type="text" value="{$this->data['master']['email']}" name="email">{/if} <span class='error_info' etype='error_info' id="email_info"></span></dt>
<dd>性别：</dd>
<dt class="sex">
<input type="radio" value="0" name="gender" {if !$this->data['master']['gender']}checked{/if}>
女
<input type="radio" value="1" name="gender" {if $this->data['master']['gender']}checked{/if}>
男
</dt>
<dd>自我介绍：</dd>
<dt>
<textarea rows="10" name="introduce" id="introduce" length="140" position="0" class="PUB_TXT">{if $this->data['master']['introduce']}{$this->data['master']['introduce']}{else}随便写点什么，让大家了解你吧。{/if}</textarea>
</dt>
<dd>&nbsp;&nbsp;</dd>
<dt>
<input type="submit" value="确定" class="green_button">
</dt>
</dl>
</form>
{elseif $this->data['type']=='password'}
<form id="setform" method="post" action="{url('User','SavePassword')}">
<dl>
	<dd>现在的密码：</dd>
	<dt>
	<input type="password" value="" class="gray_text" name="oldpassword"> <span class='error_info' etype='error_info' id="oldpassword_info"></span>
	</dt>
	<dd>新的密码：</dd>
	<dt>
	<input type="password" value="" class="gray_text" name="password"> <span class='error_info' etype='error_info' id="password_info"></span>
	</dt>
	<dd>确认密码：</dd>
	<dt>
	<input type="password" value="" class="gray_text" name="confirm"> <span class='error_info' etype='error_info' id="confirm_info"></span>
	</dt>
	<dd>&nbsp;</dd>
	<dt><input type="submit" value="确定" class="green_button"></dt>
</dl>
</form>
{/if}
</div>
</div>
</div>
</div>
<div class="piece1_ft"></div>
</div>